package cn.s1995.sloth.bizs.oo.dto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * SyhFactoryDTO
 *
 * @author Lex
 * @description
 * @date 2024/01/12 14:12
 */
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class SyhFactoryDTO implements Serializable {

    @JsonProperty("_id")
    private Id id;
    @JsonProperty("user_id")
    private Id userId;
    @JsonProperty("name")
    private String name;

    /**
     * 接待人
     */
    @JsonProperty("receiver")
    private String receiver;

    @JsonProperty("remark")
    private String remark;

    /**
     * "资质"
     */
    @JsonProperty("qualification")
    private String qualification;


    /**
     * "环保认证"
     */
    @JsonProperty("environmental_certification")
    private String environmentalCertification;

    /**
     * "专利证书"
     */
    @JsonProperty("patent_certificate")
    private String patentCertificate;


    @JsonProperty("address")
    private Address address;
    @JsonProperty("main_business")
    private String mainBusiness;
    @JsonProperty("other_contact")
    private String otherContact;
    @JsonProperty("factory_brief")
    private String factoryBrief;
    @JsonProperty("relation_name")
    private String relationName;
    @JsonProperty("relation_mobile")
    private String relationMobile;
    @JsonProperty("is_delete")
    private Integer isDelete;
    @JsonProperty("delete_date")
    private Long deleteDate;
    @JsonProperty("create_date")
    private Long createDate;
    @JsonProperty("update_date")
    private Long updateDate;
    @JsonProperty("category_id")
    private List<Id> categoryId;
    @JsonProperty("style")
    private List<String> style;
    /**
     * "工厂实拍"
     */
    @JsonProperty("factory_photo")
    private List<String> factoryPhoto;


    @JsonIgnoreProperties(ignoreUnknown = true)
    @Data
    public static class Id implements Serializable {
        @JsonProperty("$oid")
        private String oid;
    }

    @JsonIgnoreProperties(ignoreUnknown = true)
    @Data
    public static class Address implements Serializable {
        @JsonProperty("name")
        private String name;
        @JsonProperty("address")
        private String address;
        @JsonProperty("latitude")
        private String latitude;
        @JsonProperty("longitude")
        private String longitude;
        @JsonProperty("formatted_address")
        private String formattedAddress;
        @JsonProperty("full_address")
        private String fullAddress;
        @JsonProperty("province")
        private Province province;
        @JsonProperty("city")
        private Province city;
        @JsonProperty("area")
        private Province area;

        @JsonIgnoreProperties(ignoreUnknown = true)
        @Data
        public static class Province implements Serializable {
            @JsonProperty("code")
            private String code;
            @JsonProperty("name")
            private String name;
        }
    }
}
